#ifndef __UNISTD_H
#define __UNISTD_H

#include <sys/sysdef.h>
#include <fs/dirent.h>
#include <mm/mmap.h>
#include <type.h>

__SYSCALL0(pid_t, fork)
__SYSCALL0(int, yield)
__SYSCALL1(pid_t, wait, int*, status)
__SYSCALL0(int, exit)
__SYSCALL0(pid_t, getpid)
__SYSCALL3(int, write, int, fd, char*, buf, int, count)
__SYSCALL3(int, read, int, fd, char*, buf, int, count)
__SYSCALL2(int, open, const char*, name, int, flags)
__SYSCALL0(int, pause)
__SYSCALL3(pid_t, waitpid, pid_t, pid, int*, status, int, option)
__SYSCALL1(int, chdir, const char*, path)
__SYSCALL1(int, fsync, int, fd)
__SYSCALL2(int, readdir, int, fd, dirent_t*, dirent)
__SYSCALL1(int, dup, int, fd)
__SYSCALL2(int, dup2, int, oldfd, int, newfd)
__SYSCALL2(char*, getcwd, char*, buf, int, size)
__SYSCALL2(int, rename, const char*, oldpath, const char*, newpath)
__SYSCALL4(int, mount, const char*, src, const char*, target, const char*, fs, int, option)
__SYSCALL1(int, umount, const char*, target)
__SYSCALL1(int, mkdir, const char*, path)
__SYSCALL1(int, rmdir, const char*, path)
__SYSCALL3(int, lseek, int, fd, int, offset, int, option)
__SYSCALL1(int, sleep, u32, millisecond)
__SYSCALL1(int, fchdir, int, fd)
__SYSCALL3(int, realpathof, int, fd, char*, buf, size_t, size)
__SYSCALL1(int, swapon, const char*, path)
__SYSCALL3(int, execve, const char*, path, char**, argv, char**, envp)
__SYSCALL6(void*, mmap, void*, addr, size_t, len, int, prot, int, flags, int, fd, size_t, offset)
__SYSCALL1(time_t, time, time_t*, t)

#endif // __UNISTD_H